package project;

public class Practice {
    public static void main(String[] args) {
        Abstract a = new Abstract() {
            @Override
            public void test() {
                System.out.println("抽象类方法");
            }
        };

        Interface b = new Interface() {
            @Override
            public void test() {
                System.out.println("接口类方法");
            }
        };

        a.test();
        b.test();
    }
}


abstract class Abstract{
    public abstract void test();
}
interface Interface{
    void test();
}


